-- GENERATED SPELL FOR [Immortal Guardian] --


function spell0_33988(pUnit, Event) --@Drain Life,Drain--
pUnit:FullCastSpellOnTarget(64159,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_33988', 5000, 1)
end

function spell1_33988(pUnit, Event) --@Drain Life,Drain--
pUnit:FullCastSpellOnTarget(64160,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_33988', 5000, 1)
end

function Sorts_33988(pUnit, Event)
local choix_sorts_33988 = math.random(0, 1)
if choix_sorts_33988 == 0 then
pUnit:RegisterEvent('spell0_33988', 1, 1)
end
if choix_sorts_33988 == 1 then
pUnit:RegisterEvent('spell1_33988', 1, 1)
end
end

function mob33988_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_33988', math.random(1500, 3000), 1)
end

function mob33988_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob33988_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob33988_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(33988, 1, 'mob33988_Action')
RegisterUnitEvent(33988, 2, 'mob33988_Leave')
RegisterUnitEvent(33988, 3, 'mob33988_Kill')
RegisterUnitEvent(33988, 4, 'mob33988_Die')
